package entities;

public class OwnerAssociation {
	private long id;
	private String personCode;
	private String sheetCode;
	private String sheetType;
	
	public OwnerAssociation() {
		
	}
	
		
	public OwnerAssociation(String personCode, String sheetCode, String sheetType) {
		this.personCode = personCode;
		this.sheetCode = sheetCode;
		this.sheetType = sheetType;
	}



	public String getSheetType() {
		return sheetType;
	}
	public void setSheetType(String sheetType) {
		this.sheetType = sheetType;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getPersonCode() {
		return personCode;
	}
	public void setPersonCode(String personCode) {
		this.personCode = personCode;
	}
	public String getSheetCode() {
		return sheetCode;
	}
	public void setSheetCode(String sheetCode) {
		this.sheetCode = sheetCode;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((personCode == null) ? 0 : personCode.hashCode());
		result = prime * result
				+ ((sheetCode == null) ? 0 : sheetCode.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OwnerAssociation other = (OwnerAssociation) obj;
		if (personCode == null) {
			if (other.personCode != null)
				return false;
		} else if (!personCode.equals(other.personCode))
			return false;
		if (sheetCode == null) {
			if (other.sheetCode != null)
				return false;
		} else if (!sheetCode.equals(other.sheetCode))
			return false;
		return true;
	}



	
}
